import {Component,OnInit,ViewChild} from '@angular/core';
import { PageModel } from "../../../../model/page-model";
import { ModalDirective } from 'ng2-bootstrap/modal';
import { flyIn } from '../../../../animations/fly-in';
import { ActivatedRoute } from '@angular/router';


@Component({
  selector: 'maintenancerecord',
  templateUrl: './maintenancerecord.component.html',
  styleUrls: ['./maintenancerecord.component.css'],
  animations: [
      flyIn
  ]
})
export class Maintenancerecord implements OnInit{
  @ViewChild('myModal') public myModal:ModalDirective;
  pageModel = new PageModel();
  page:number = 1;
  btype:number;
  name:any;
  num:any;
  IDnum:any;
  phone:any;
  parentpage:number;
  constructor(private activeRoute:ActivatedRoute) {}
  ngOnInit() {   
     this.activeRoute.params.subscribe(params => {
      console.log(params)
      this.parentpage = params['userId'].split(',')[1];
     // console.log(parentpage)
     
    });
  }
  getAll(page) {

  }
  cancel(){
    this.name="";
    this.num="";
    this.IDnum="";
    this.phone="";
  }



}

